using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace TongJi_EMS
{
    public partial class Alarmlight : UserControl
    {
        public static bool Alarm;
        private float x;
        private float y;
        public Alarmlight()
        {
            InitializeComponent();
        }

        private void Alarmlight_Load(object sender, EventArgs e)
        {
            this.Alarmlight_Resize(sender, e);
        }

        private void Alarmlight_Paint(object sender, PaintEventArgs e)
        {
        //    if (Alarm)
        //    {
        //        e.Graphics.FillEllipse(Brushes.Red, this.x * 0.5f, this.y * 0.4f, this.x, this.y * 1.2f);
        //        e.Graphics.FillRectangle(Brushes.Red, this.x * 0.5f, this.y, this.x, this.y * 0.6f);
        //    }
        //    else
        //    {
        //        e.Graphics.FillEllipse(Brushes.GreenYellow, this.x * 0.5f, this.y * 0.4f, this.x, this.y * 1.2f);
        //        e.Graphics.FillRectangle(Brushes.GreenYellow, this.x * 0.5f, this.y, this.x, this.y * 0.6f);
        //    }
        //    e.Graphics.FillRectangle(Brushes.DarkBlue, (float)(this.x * 0.25f), (float)(this.y * 1.5f), (float)(this.x * 1.5f), (float)(this.y * 0.3f));
        }

        private void Alarmlight_Resize(object sender, EventArgs e)
        {
            this.x = base.Width / 2;
            this.y = base.Height / 2;
            this.Refresh();
        }
    }
}
